<template>
	<div>
		<h1 style="text-align: center;">{{detail.title}}</h1>
		<h4 style="text-align:center; ">{{detail.subtitle}}</h4>
		<div v-html="detail.content"></div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				detail: {
					title: '',
					subtitle: '',
					subtitle: '',
				}
			};
		},
		methods: {
			initTopic(sid) {
				let _this = this;
				var params = new URLSearchParams();
				params.append('id', sid);
				_this.$axios.post(_this.$api.TopicDetail, params).then(function(response) {
						console.log(response)
						_this.detail = response.data.data;
					})
					.catch(function(error) {
						console.log(error)
					});
			},
		},
		mounted() {
			this.initTopic(this.$route.query.id);
		}
	}
</script>

<style>

</style>
